package com.jw.springframework;

import com.jw.springframework.service.IndexService;
import com.jw.springframework.service.OrderService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * @ClassName: TestMain
 * @Description: TODO
 * @Author: darkness
 * @Date: 2021/4/10 0010 4:21
 * @Version: 1.0
 * @Type: class
 **/
@ComponentScan("com.jw.springframework")
public class TestMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(TestMain.class);
        System.out.println(ac.getBean(OrderService.class));
        System.out.println(ac.getBean(IndexService.class));
    }
}
